import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    name:sessionStorage.getItem('name')
  },
  getters: {
  },
  mutations: {
    updateName(state,wname){
      window.sessionStorage.setItem('name',wname)
    }
  },
  actions: {
    updateName(Store,name){
      Store.commit('updateName',name)
    }
  },
  modules: {
  }
})
